package com.atguigu.gmall.payment.client;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.payment.client.impl.PaymentFeignClientImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "service-payment", path = "/api/payment/alipay")
public interface PaymentFeignClient {

    //查询交易结果
    @GetMapping("/check/pay/status/remote/{outTradeNo}")
    Result<Boolean> checkPayStatusRemote(@PathVariable("outTradeNo") String outTradeNo);

    //关闭支付宝交易订单
    @GetMapping("/close/pay/remote/{outTradeNo}")
    Result<Boolean> closePay(@PathVariable("outTradeNo") String outTradeNo);

    //关闭paymentInfo订单
    @GetMapping("/close/paymentInfo/status/remote/{outTradeNo}")
    Result<Boolean> closePaymentInfo(@PathVariable("outTradeNo") String outTradeNo);
}
